<template>
  <view class="cl-cell">
    <u-cell-group>
      <u-cell
        v-for="(item, index) in list"
        :key="index"
        :title="item.name"
        :value="item.value"
        :arrow="arrow"
        @click="uCell(item)"
      >
        <template slot="right-icon">
          <clIcon
            class="w100"
            :type="item.icon"
            color="#000"
            size="20"
          ></clIcon>
        </template>
      </u-cell>
    </u-cell-group>
  </view>
</template>

<script>
import clIcon from "@/components/cl-icon/cl-icon.vue";
export default {
  name: "cl-cell",
  components: {
    clIcon,
  },
  props: {
    list: {
      type: [Array],
      default: [],
    },
  },

  data() {
    return {
      arrow: false,
    };
  },

  methods: {
    uCell(item){
      this.$emit("change",item)
    },
  },
};
</script>

<style>
.w100 {
  width: 160upx;
  display: flex;
  justify-content: flex-end;
}
</style>